Skip to main content

Around the world in 80 Seconds

🎯 Ready, Aim, Target

Now that we have our debug tools in place, you'll update the targeting rules in the new-product-experience-flag to target goggles at this region for only the Developers segment and remove the Beta Users segment. Remember, we don't want to accidentally roll out goggles to that region before we get the go ahead!

Step 1: We've got approval to release goggles to Portugal, so let's start by targeting Portugal.

Step 2: Here's the before view of our rollout rule for the new product experience to our Developers segment:

Step 3: Instead of adding a new targeting rule, we're going to add an AND to our existing rule, here's how:

  1. Click the blue plus sign to the right of your rule
  2. Under Context kind select "location"
  3. Under Attribute select "country"
  4. Under Operator select "is one of" (if it's not already selected)
  5. Under Values type "PT" and select "Add PT" if "PT" doesn't come up in the dropdown.
  6. Save your changes.

Step 4: If you've done it all correctly, your rule should look like this now:

This rule says that a context should be both in the location we've defined and in the Developers segment.

Targeting Superpowers
Combining targeting rules can be really powerful. While it's very hard to get it right in code, it's ridiculously easy in LaunchDarkly.

🔍 Where'd My Goggles Go?

Your goggles are now only available when you're in Portugal, or at least when your context is set to Portugal. You should have seen the inventory reload and you no longer see goggles in your product list.

This confirms that outside of Portugal, customers are not yet seeing goggles. So naturally, we need to take a trip to Portugal!

Disclaimer
Toggle Outfitters will not reimburse you for travel expenses incurred.

Step 1: Click or hover over the Debug: Country Override button to show the selection panel and click Portugal.

Step 2: To confirm your country selection is taken up, click the Debug: App Data button. You should see something like this:

Portugal has a country code of PT as seen above.

Step 3: As soon as you make this change, the list of products should reload and you should have goggles in your inventory again!

Look at that! You've released a webstore, migrated technologies, and travelled to Portugal all on your first day! 😱

The Toggle Outfitters leadership team is blown away by your accomplishments so far. How are you going to follow this up? Serendipitously, while you were in Portugal, you happened to meet a data scientist on a beach in Lisbon who expounded the benefits of using product data to make educated business decisions. As you sipped your Madeira, you wondered if there was some way you could incorporate data science into the Toggle Outfitters site. Fortunately, you can! On to Experimentation!